package com.marktotop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.marktotop.entity.LoginLog;
import com.marktotop.vo.AdminVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * LoginLogMapper
 *
 * @author WXLD
 * @Data 2021/7/1
 * @Since 1.0
 */
public interface LoginLogMapper extends BaseMapper<LoginLog> {

    /**
     * 分页展示登录日志列表
     *
     * @param page
     * @param loginLog
     * @return
     */
    IPage<LoginLog> getLoginLogByPage(Page<LoginLog> page,
                                      @Param("loginLog")LoginLog loginLog);

    /**
     * 用户登入报表
     *
     * @param adminVO
     * @return
     */
    List<Map<String, Object>> userLoginReport(AdminVO adminVO);
}
